<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>TimeBar (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="TimeBar (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.ui</a></div>
<h2 title="Interface TimeBar" class="title">Interface TimeBar</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="DefaultTimeBar.html" title="class in com.google.android.exoplayer2.ui">DefaultTimeBar</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">TimeBar</span></pre>
<div class="block">Interface for time bar views that can display a playback position, buffered position, duration
 and ad markers, and that have a listener for scrubbing (seeking) events.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="TimeBar.OnScrubListener.html" title="interface in com.google.android.exoplayer2.ui">TimeBar.OnScrubListener</a></span></code></th>
<td class="colLast">
<div class="block">Listener for scrubbing events.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addListener(com.google.android.exoplayer2.ui.TimeBar.OnScrubListener)">addListener</a></span>&#8203;(<a href="TimeBar.OnScrubListener.html" title="interface in com.google.android.exoplayer2.ui">TimeBar.OnScrubListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Adds a listener for scrubbing events.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPreferredUpdateDelay()">getPreferredUpdateDelay</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the preferred delay in milliseconds of media time after which the time bar position
 should be updated.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeListener(com.google.android.exoplayer2.ui.TimeBar.OnScrubListener)">removeListener</a></span>&#8203;(<a href="TimeBar.OnScrubListener.html" title="interface in com.google.android.exoplayer2.ui">TimeBar.OnScrubListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block">Removes a listener for scrubbing events.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdGroupTimesMs(long%5B%5D,boolean%5B%5D,int)">setAdGroupTimesMs</a></span>&#8203;(long[]&nbsp;adGroupTimesMs,
                 boolean[]&nbsp;playedAdGroups,
                 int&nbsp;adGroupCount)</code></th>
<td class="colLast">
<div class="block">Sets the times of ad groups and whether each ad group has been played.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBufferedPosition(long)">setBufferedPosition</a></span>&#8203;(long&nbsp;bufferedPosition)</code></th>
<td class="colLast">
<div class="block">Sets the buffered position.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDuration(long)">setDuration</a></span>&#8203;(long&nbsp;duration)</code></th>
<td class="colLast">
<div class="block">Sets the duration.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEnabled(boolean)">setEnabled</a></span>&#8203;(boolean&nbsp;enabled)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setKeyCountIncrement(int)">setKeyCountIncrement</a></span>&#8203;(int&nbsp;count)</code></th>
<td class="colLast">
<div class="block">Sets the position increment for key presses and accessibility actions, as a number of
 increments that divide the duration of the media.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setKeyTimeIncrement(long)">setKeyTimeIncrement</a></span>&#8203;(long&nbsp;time)</code></th>
<td class="colLast">
<div class="block">Sets the position increment for key presses and accessibility actions, in milliseconds.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPosition(long)">setPosition</a></span>&#8203;(long&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Sets the current position.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="addListener(com.google.android.exoplayer2.ui.TimeBar.OnScrubListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addListener</h4>
<pre class="methodSignature">void&nbsp;addListener&#8203;(<a href="TimeBar.OnScrubListener.html" title="interface in com.google.android.exoplayer2.ui">TimeBar.OnScrubListener</a>&nbsp;listener)</pre>
<div class="block">Adds a listener for scrubbing events.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - The listener to add.</dd>
</dl>
</li>
</ul>
<a id="removeListener(com.google.android.exoplayer2.ui.TimeBar.OnScrubListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeListener</h4>
<pre class="methodSignature">void&nbsp;removeListener&#8203;(<a href="TimeBar.OnScrubListener.html" title="interface in com.google.android.exoplayer2.ui">TimeBar.OnScrubListener</a>&nbsp;listener)</pre>
<div class="block">Removes a listener for scrubbing events.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>listener</code> - The listener to remove.</dd>
</dl>
</li>
</ul>
<a id="setEnabled(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnabled</h4>
<pre class="methodSignature">void&nbsp;setEnabled&#8203;(boolean&nbsp;enabled)</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://developer.android.com/reference/android/view/View.html#isEnabled()" title="class or interface in android.view" class="externalLink" target="_top"><code>View.isEnabled()</code></a></dd>
</dl>
</li>
</ul>
<a id="setKeyTimeIncrement(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setKeyTimeIncrement</h4>
<pre class="methodSignature">void&nbsp;setKeyTimeIncrement&#8203;(long&nbsp;time)</pre>
<div class="block">Sets the position increment for key presses and accessibility actions, in milliseconds.
 <p>
 Clears any increment specified in a preceding call to <a href="#setKeyCountIncrement(int)"><code>setKeyCountIncrement(int)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>time</code> - The time increment, in milliseconds.</dd>
</dl>
</li>
</ul>
<a id="setKeyCountIncrement(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setKeyCountIncrement</h4>
<pre class="methodSignature">void&nbsp;setKeyCountIncrement&#8203;(int&nbsp;count)</pre>
<div class="block">Sets the position increment for key presses and accessibility actions, as a number of
 increments that divide the duration of the media. For example, passing 20 will cause key
 presses to increment/decrement the position by 1/20th of the duration (if known).
 <p>
 Clears any increment specified in a preceding call to <a href="#setKeyTimeIncrement(long)"><code>setKeyTimeIncrement(long)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>count</code> - The number of increments that divide the duration of the media.</dd>
</dl>
</li>
</ul>
<a id="setPosition(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPosition</h4>
<pre class="methodSignature">void&nbsp;setPosition&#8203;(long&nbsp;position)</pre>
<div class="block">Sets the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>position</code> - The current position to show, in milliseconds.</dd>
</dl>
</li>
</ul>
<a id="setBufferedPosition(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBufferedPosition</h4>
<pre class="methodSignature">void&nbsp;setBufferedPosition&#8203;(long&nbsp;bufferedPosition)</pre>
<div class="block">Sets the buffered position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bufferedPosition</code> - The current buffered position to show, in milliseconds.</dd>
</dl>
</li>
</ul>
<a id="setDuration(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDuration</h4>
<pre class="methodSignature">void&nbsp;setDuration&#8203;(long&nbsp;duration)</pre>
<div class="block">Sets the duration.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>duration</code> - The duration to show, in milliseconds.</dd>
</dl>
</li>
</ul>
<a id="getPreferredUpdateDelay()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreferredUpdateDelay</h4>
<pre class="methodSignature">long&nbsp;getPreferredUpdateDelay()</pre>
<div class="block">Returns the preferred delay in milliseconds of media time after which the time bar position
 should be updated.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Preferred delay, in milliseconds of media time.</dd>
</dl>
</li>
</ul>
<a id="setAdGroupTimesMs(long[],boolean[],int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setAdGroupTimesMs</h4>
<pre class="methodSignature">void&nbsp;setAdGroupTimesMs&#8203;(@Nullable
                       long[]&nbsp;adGroupTimesMs,
                       @Nullable
                       boolean[]&nbsp;playedAdGroups,
                       int&nbsp;adGroupCount)</pre>
<div class="block">Sets the times of ad groups and whether each ad group has been played.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adGroupTimesMs</code> - An array where the first <code>adGroupCount</code> elements are the times of
     ad groups in milliseconds. May be <code>null</code> if there are no ad groups.</dd>
<dd><code>playedAdGroups</code> - An array where the first <code>adGroupCount</code> elements indicate whether
     the corresponding ad groups have been played. May be <code>null</code> if there are no ad
     groups.</dd>
<dd><code>adGroupCount</code> - The number of ad groups.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
